#include<bits/stdc++.h>
using namespace std;

int a[100005];
int b[100005];

int main()
{
    freopen("duel.in", "r", stdin);
    freopen("duel.out", "w", stdout);

    int n = 0, res = 0;

    cin >> n;

    for(int i = 1; i <= n; i++)
    {
        cin >> a[i];
    }

    sort(a + 1, a + n + 1);

    for(int i = 1; i <= n; i++)
    {
        for(int j = a[i] - 1; j > 0; j--)
        {
            if(b[j] > 0)
            {
                b[j] -= 1;
                break;
            }
        }
        b[a[i]] ++;
    }

    for(int i = 1; i <= a[n]; i++)
    {
        res += b[i];
    }


    cout << res;


    fclose(stdin);
    fclose(stdout);

    return 0;
}
